Field of the Invention
Embodiments of the present invention relate generally to graphics processing and, more particularly, to enhanced anti-aliasing by varying sample patterns spatially and/or temporally.
Description of the Related Art
In a graphics processing pipeline, the rasterizer is typically responsible for computing coverage information for pixels based on geometry associated with a graphics scene. For example, for a given pixel, the rasterizer could determine that a triangle in the graphics scene covers the pixel. The pixel may then be shaded, later in the pipeline, based on the color of the triangle. The rasterizer computes coverage information for a pixel by determining whether the geometry covers the pixel at one or more coverage sample locations within the pixel.
In a simple configuration, coverage is determined by testing whether geometry covers the center of the pixel, where the center of the pixel is used as the coverage sample location. However, this form of sampling can be inaccurate, especially for complex shapes. Accordingly, modern rasterizers oftentimes employ a multisampling approach, where coverage within the pixel is tested at multiple different coverage sample locations. The positions of the multiple samples are generally fixed and identical from pixel to pixel to reflect a specific sample pattern that has been empirically determined to yield accurate coverage information for a range of graphics scenes.
One drawback of the above approach is that the quality of images generated via conventional multisampling is dependent on the number of sample locations used per pixel. Consequently, to generate higher quality images, more sample locations must be implemented. However, these additional sample locations incur significant overhead. Specifically, additional frame buffer space must be allocated to accommodate color, z-data, and other types of information associated with the additional samples. In sum, the quality of images, as well as the requisite overhead, scales with the number of samples.
As the foregoing illustrates, what is needed in the art is a technique for increasing image quality without incurring the overhead associated with increasing the number of samples per pixel.